#ifndef __RSSREADER_H__
#define __RSSREADER_H__

#include <iostream>
#include <regex>
#include <string>
#include <utility>
#include <vector>
#include <utility>
#include <cmath>
#include "../include/Configuration.h"
#include "../include/SplitTool.h"
#include "../include/tinyxml2.h"
#include "simhash/Simhasher.hpp"

using namespace simhash;
using namespace std;
using namespace tinyxml2;

struct RssItem {
    string title;
    string link;
    string description;
    string content;
};

class RssReader {
   public:
    RssReader();
    void parseRss(std::vector<std::string>& paths);  // 解析
    void deDuplicateBySimHash();  // 通过simhash实现相似文章的去除
    std::vector<std::string> formatToString();

   private:
    vector<RssItem> _rss;
};

#endif